import 'package:flutter/material.dart';

import 'package:get_storage/get_storage.dart';
import '/home/release_calendar.dart';
import '/home/detail.dart';
import '/home/exchange/details.dart';
import '/home/exchange/order.dart';
import '/home/exchange/suu.dart';
import '/home/exchange/parties.dart';
import '/home/exchange/listdate.dart';
import '/home/exchange/exchange_details.dart';
import '/home/exchange/backsuu.dart';
import 'package:get/get.dart';
import 'login/register_tow.dart';
import 'tabs/tab.dart';
import '/market/snap_up.dart';
import '/login/get_password.dart';
import '/login/login_type.dart';
import '/user/index.dart';
import '/user/setting.dart';
import '/user/assets.dart';
import '/user/change_password.dart';
import '/user/live_seeting.dart';
import '/user/certification.dart';
import '/user/mall_integral.dart';
import '/user/order_list.dart';
import '/user/mall_wallet.dart';
import '/webview.dart';
import '/user/personal/index.dart';
import '/user/personal/edit_info.dart';
import '/web_tabs/activity/synthesis.dart';
import '/web_tabs/activity/detail.dart';
import '/web_tabs/invitation.dart';
import '/web_tabs/lottery/lottery_draw.dart';
import '/web_tabs/lottery/lottery_list.dart';
import '/web_tabs/lottery/rule.dart';
import '/web_tabs/market/market_list.dart';
import '/web_tabs/market/transaction_record.dart';
import '/web_tabs/market/market_detail.dart';

import '/web_tabs/details/pay_success.dart';

import '/web_tabs/resale/detail.dart';
import '/web_tabs/resale/resale.dart';
import '/web_tabs/resale/sale.dart';
import '/web_tabs/announcement/index.dart';
import '/web_tabs/announcement/detail.dart';

import '/agreement.dart';
import '/screen.dart';
import '/web_webview.dart';
import 'user/collect.dart';
import 'web_tabs/activity/decomposition_detail.dart';
import 'web_tabs/activity/replacement_detail.dart';
import 'web_tabs/resale/open_box.dart';
import 'web_tabs/shopping/mall_address.dart';
import 'web_tabs/shopping/mall_amount.dart';
import 'web_tabs/shopping/mall_up_addrerss.dart';

void main() async {
  await GetStorage.init();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      debugShowCheckedModeBanner: false,
      title: '公海集合',
      theme: ThemeData(
        scaffoldBackgroundColor: Color(0xffffffff),
        // colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        // useMaterial3: true,
      ),
      initialRoute: "/",
      getPages: [
        GetPage(name: '/', page: () => tabsPage()),
        // GetPage(name: '/tabs/tab', page: () => Screen()),
        GetPage(name: '/user/collect', page: () => Collect()),
        GetPage(name: '/home/release_calendar', page: () => ReleaseCalendar()),
        GetPage(name: '/home/detail', page: () => Detail()),
        GetPage(name: '/home/exchange/details', page: () => Details()),
        GetPage(name: '/home/exchange/order', page: () => Order()),
        GetPage(name: '/home/exchange/suu', page: () => Suu()),
        GetPage(name: '/home/exchange/parties', page: () => Parties()),
        GetPage(name: '/home/exchange/listdate', page: () => Listdate()),
        GetPage(name: '/web_webview', page: () => WebViewPage()),
        GetPage(
          name: '/home/exchange/exchange_details',
          page: () => ExchangeDetails(),
        ),
        GetPage(name: '/home/exchange/backsuu', page: () => Backsuu()),
        GetPage(name: '/login/get_password', page: () => GetPassword()),
        GetPage(name: '/login/login_type', page: () => LoginType()),

        GetPage(name: '/login/register_tow', page: () => LoginTypeTow()),
        GetPage(
          name: '/web_tabs/shopping/mall_amount',
          page: () => MallAmount(),
        ),

        GetPage(name: '/user/index', page: () => Index()),
        GetPage(name: '/user/setting', page: () => Setting()),
        GetPage(name: '/user/assets', page: () => Assets()),
        GetPage(name: '/user/mall_integral', page: () => MallIntegral()),
        GetPage(name: '/user/order_list', page: () => OrderList()),
        GetPage(name: '/user/mall_wallet', page: () => MallWallet()),
        GetPage(name: '/webview', page: () => WebViewWithReturn()),
        GetPage(name: '/user/personal/index', page: () => UserHome()),
        GetPage(name: '/user/personal/edit_info', page: () => EditInfo()),
        GetPage(name: '/market/snap_up', page: () => SnapUp()),
        GetPage(name: '/web_tabs/activity/synthesis', page: () => Synthesis()),
        GetPage(
          name: '/web_tabs/shopping/mall_address',
          page: () => MallAddress(),
        ),
        GetPage(
          name: '/web_tabs/shopping/mall_up_addrerss',
          page: () => MallUpAddrerss(),
        ),

        GetPage(
          name: '/web_tabs/activity/detail',
          page: () => ActivityDetail(),
        ),
        GetPage(
          name: '/web_tabs/activity/decomposition_detail',
          page: () => DecompositionDateil(),
        ),
        GetPage(
          name: '/web_tabs/activity/replacement_detail',
          page: () => ReplacementDateil(),
        ),

        GetPage(
          name: '/web_tabs/details/pay_success',
          page: () => PaySuccess(),
        ),

        GetPage(
          name: '/web_tabs/activity/detail',
          page: () => ActivityDetail(),
        ),
        GetPage(name: '/web_tabs/invitation', page: () => Invitation()),
        GetPage(
          name: '/web_tabs/lottery/lottery_draw',
          page: () => LotteryDraw(),
        ),
        GetPage(
          name: '/web_tabs/lottery/lottery_list',
          page: () => LotteryList(),
        ),
        GetPage(name: '/web_tabs/lottery/rule', page: () => Rule()),
        GetPage(name: '/web_tabs/market/market_list', page: () => MarketList()),
        GetPage(
          name: '/web_tabs/market/transaction_record',
          page: () => TransactionRecord(),
        ),
        GetPage(
          name: '/web_tabs/market/market_detail',
          page: () => MarketDetail(),
        ),
        GetPage(name: '/web_tabs/resale/detail', page: () => resaleDateil()),
        GetPage(name: '/web_tabs/resale/resale', page: () => Resale()),
        GetPage(name: '/web_tabs/resale/sale', page: () => Sale()),
        GetPage(name: '/web_tabs/resale/open_box', page: () => OpenBox()),

        GetPage(
          name: '/web_tabs/announcement/index',
          page: () => Announcement(),
        ),
        GetPage(
          name: '/web_tabs/announcement/detail',
          page: () => AnnouncementDetail(),
        ),

        GetPage(name: '/user/certification', page: () => Certification()),
        GetPage(name: '/user/live_seeting', page: () => LiveSeeting()),
        GetPage(name: '/user/change_password', page: () => ChangePassword()),
        GetPage(name: '/agreement', page: () => Agreement()),
      ],
    );
  }
}

// class MyHomePage extends StatefulWidget {
//   const MyHomePage({super.key, required this.title});

//   final String title;

//   @override
//   State<MyHomePage> createState() => _MyHomePageState();
// }

// class _MyHomePageState extends State<MyHomePage> {
//   int _counter = 0;

//   void _incrementCounter() {
//     setState(() {
//       _counter++;
//     });
//   }

//   @override
//   Widget build(BuildContext context) {

//     return Scaffold(
//       appBar: AppBar(
//         backgroundColor: Theme.of(context).colorScheme.inversePrimary,
//         title: Text(widget.title),
//       ),
//       body: Center(
//         child: Column(
//           mainAxisAlignment: MainAxisAlignment.center,
//           children: <Widget>[
//             const Text(
//               'You have pushed the button this many times:',
//             ),
//             Text(
//               '$_counter',
//               style: Theme.of(context).textTheme.headlineMedium,
//             ),
//           ],
//         ),
//       ),
//       floatingActionButton: FloatingActionButton(
//         onPressed: _incrementCounter,
//         tooltip: 'Increment',
//         child: const Icon(Icons.add),
//       ), // This trailing comma makes auto-formatting nicer for build methods.
//     );
//   }
// }
